package com.gitee.melin.bee.core.conf;

/**
 * @author melin
 */
public class ConfigBuilder {

    private String key;
    private String doc;
    private String version;

    public ConfigBuilder(String key) {
        this.key = key;
    }

    public ConfigBuilder doc(String doc) {
        this.doc = doc;
        return this;
    }

    public ConfigBuilder version(String version) {
        this.version = version;
        return this;
    }

    public String getKey() {
        return key;
    }

    public String getDoc() {
        return doc;
    }

    public String getVersion() {
        return version;
    }

    public TypedConfigBuilder<Integer> intConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<Long> longConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<Double> doubleConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<Boolean> booleanConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<String> stringConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<StringArray> stringArrayConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<MapStringValue> mapStringConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<MapIntegerValue> mapIntegerConf() {
        return new TypedConfigBuilder<>(this);
    }

    public TypedConfigBuilder<MapBooleanValue> mapBooleanConf() {
        return new TypedConfigBuilder<>(this);
    }
}
